/*
 * Copyright (c) 2025 Li Auto Inc. and its affiliates
 * Licensed under the Apache License, Version 2.0(the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "veth.h"

#define VETH_CTRL_CORE0_NUM (1)

static const uint8 eth_controller_index_map[VETH_CTRL_CORE0_NUM] = {
    0x0U,
};

static veth_core_ctrl_config_type eth_core_ctrl_config_core0[VETH_CTRL_CORE0_NUM] = {
    {
        (uint16)1522U, /*Configured Receive Buffer Length*/
        (uint16)1522U, /*Configured Transmit Buffer Length*/
        ETH_ENABLE, /*TxInt_Enable*/
        ETH_ENABLE, /*RxInt_Enable*/
        (uint8)10U, /*Total Receive Buffer*/
        (uint8)15U, /*Total Transmit Buffer*/
        { (uint8)0x12U, (uint8)0x34U, (uint8)0x56U, (uint8)0x78U, (uint8)0x9AU, (uint8)0xBCU },
        (uint8)0, /* Eth Controller Index */
        (uint8)0, /* TAP DEV fd */
    },
};

static const veth_core_config_type eth_config_core0 = {
    (veth_core_ctrl_config_type *)eth_core_ctrl_config_core0, /* Core 0 configuration information */
    VETH_CTRL_CORE0_NUM /* Maximum controllers allocated to core0 */
}; /* Structure to store core0 configuration data */

const veth_config_type veth_config_set = {
    { (veth_core_config_type *)&eth_config_core0, /* Core 0 */
      NULL_PTR, /* Core 1, and so on */
      NULL_PTR, NULL_PTR },
    (uint8 *)eth_controller_index_map /* Mapping information */
};
